Micron Document
<!DOCTYPE html>
<html class="client-nojs vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-0 vector-toc-not-available vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-0 vector-feature-night-mode-enabled skin-theme-clientpref-os vector-sticky-header-enabled" lang="fr" dir="ltr"><head>
<meta charset="UTF-8">
<title>JSON-LD</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/png" href="./_res_/favicon.png">
<link rel="canonical" href="https://fr.wikipedia.org/wiki/JSON-LD"> <link href="./_mw_/ext.cite.styles.css" rel="stylesheet" type="text/css">
<link href="./_mw_/ext.pygments.css" rel="stylesheet" type="text/css">
<link href="./_mw_/ext.wikimediamessages.styles.css" rel="stylesheet" type="text/css">
<link href="./_mw_/skins.vector.icons.css" rel="stylesheet" type="text/css">
<link href="./_mw_/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
<link href="./_mw_/skins.vector.styles.css" rel="stylesheet" type="text/css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" type="text/css" href="./_mw_/site.styles.css">
<link rel="stylesheet" type="text/css" href="./_mw_/noscript.css">
<link rel="stylesheet" type="text/css" href="./_res_/footer.css">
<link rel="stylesheet" type="text/css" href="./_res_/vector-2022.css">
</head>
<body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-JSON-LD rootpage-JSON-LD skin-vector-2022 action-view">
<div class="mw-page-container">
<div class="mw-page-container-inner">
<div class="mw-content-container">
<main id="content" class="mw-body">
<header class="mw-body-header vector-page-titlebar">
<h1 id="firstHeading" class="firstHeading mw-first-heading"><span lang="en">JSON-LD</span></h1>
</header>
<a id="top"></a>
<div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
<div id="contentSub">
<div id="mw-content-subtitle"></div>
</div>
<div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="fr" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="fr" dir="ltr">
<p class="mw-empty-elt">
</p>
<div class="infobox_v3 infobox infobox--frwiki noarchive large"><div class="entete icon informatique" style="background-color:#C0C0C0"><div>JSON-LD<br><small>JavaScript Object Notation for Linked Data</small><style data-mw-deduplicate="TemplateStyles:r228712691">
/* start https://fr.wikipedia.org/ */


.mw-parser-output .entete.informatique{background-image:url("./_mw_/Picto.nfo.png")}


/* end https://fr.wikipedia.org/ */
</style></div></div><div><div class="images" style="padding:2px 0"></div></div><table><caption style="text-align:center;background-color:#C0C0C0">Caractéristiques</caption><tbody><tr class=""><th scope="row"><a href="Extension_de_nom_de_fichier" title="Extension de nom de fichier">Extension</a></th><td class=""><div>
<code>.jsonld</code></div></td></tr><tr class=""><th scope="row"><a href="Type_de_m%C3%A9dias" title="Type de médias">Type MIME</a></th><td class=""><div>
<code>application/ld+json</code></div></td></tr><tr class=""><th scope="row"><a href="Base_PRONOM" title="Base PRONOM">PUID</a></th><td class=""><div>
<span class="wd_p2748"><a rel="nofollow" class="external text" href="https://www.nationalarchives.gov.uk/pronom/fmt/880">fmt/880</a></span></div></td></tr><tr class=""><th scope="row">Développé par</th><td class=""><div>
Manu Sporny</div></td></tr><tr class=""><th scope="row">Version initiale</th><td class=""><div>
<span class="wd_p577"><time class="nowrap date-lien" datetime="2014-01-16" data-sort-value="2014-01-16"><a href="16_janvier" title="16 janvier">16</a> <a href="Janvier_2014" title="Janvier 2014">janvier</a> <a href="2014" title="2014">2014</a></time>, <time datetime="2010" data-sort-value="2010" class="date-lien"><a href="2010" title="2010">2010</a></time></span></div></td></tr><tr class=""><th scope="row">Type de format</th><td class=""><div>
<a href="Web_s%C3%A9mantique" title="Web sémantique">Web sémantique</a></div></td></tr><tr class=""><th scope="row">Basé sur</th><td class=""><div>
<a href="JSON" class="mw-redirect" title="JSON">JSON</a></div></td></tr><tr class=""><th scope="row">Norme</th><td class=""><div>
<a rel="nofollow" class="external text" href="http://www.w3.org/TR/json-ld/">JSON-LD 1.0</a> / <a rel="nofollow" class="external text" href="http://www.w3.org/TR/json-ld-api/">JSON-LD 1.0 API</a></div></td></tr><tr class=""><th scope="row">Site web</th><td class=""><div>
<a rel="nofollow" class="external text" href="https://json-ld.org">json-ld.org</a></div></td></tr></tbody></table></div>
<p><b><span class="lang-en" lang="en"><i>JSON-LD</i></span></b>, ou <b>J</b>ava<b>S</b>cript <b>O</b>bject <b>N</b>otation for <b>L</b>inked <b>D</b>ata, est une méthode permettant d'encoder des <a href="Web_des_donn%C3%A9es" title="Web des données">données structurées</a> (en anglais linked data) en utilisant du <a href="JSON" class="mw-redirect" title="JSON">JSON</a>. Le but est de fournir un moyen simple aux développeurs de transformer des données existantes en JSON vers du JSON-LD<sup id="cite_ref-1" class="reference"><a href="#cite_note-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup>. Cela permet de <a href="S%C3%A9rialisation" title="Sérialisation">sérialiser</a> des données de la même manière qu'avec du JSON traditionnel<sup id="cite_ref-2" class="reference"><a href="#cite_note-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup>. JSON-LD est une <a href="World_Wide_Web_Consortium#Specification_maturation" title="World Wide Web Consortium">recommandation du World Wide Web Consortium</a> et, par conséquent, est considéré comme un standard<sup id="cite_ref-3" class="reference"><a href="#cite_note-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup>. JSON-LD est développé par le <a rel="nofollow" class="external text" href="http://json-ld.org/">JSON for Linking Data Community Group</a>.
</p><p>Créé par Manu Sporny fin 2008<sup id="cite_ref-4" class="reference"><a href="#cite_note-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup>, il est depuis le <time class="nowrap" datetime="2014-01-14" data-sort-value="2014-01-14">14 janvier 2014</time> un standard du <a href="W3C" class="mw-redirect" title="W3C">W3C</a><sup id="cite_ref-5" class="reference"><a href="#cite_note-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup>.
</p>

<div class="mw-heading mw-heading2"><h2 id="Design">Design</h2></div>
<p>JSON-LD est pensé autour du concept de «&nbsp;contexte&nbsp;» afin de fournir des associations depuis du JSON vers un modèle <a href="Resource_Description_Framework" title="Resource Description Framework">RDF</a>. Ce contexte permet de lier des propriétés d'objets d'un document JSON vers des concepts dans une <a href="Ontologie_(informatique)" title="Ontologie (informatique)">ontologie</a>. Afin de faire le lien entre la syntaxe JSON-LD vers RDF, JSON-LD permet de convertir des valeurs en un type spécifié ou d'être étiqueté avec une langue. Un contexte peut être directement intégré dans un document JSON-LD ou placé dans un fichier séparé et référencé à partir de différents documents (à partir de documents JSON traditionnels via un lien d'en-tête HTTP).
</p>
<div class="mw-heading mw-heading2"><h2 id="Exemple">Exemple</h2></div>
<div class="mw-highlight mw-highlight-lang-json-ld mw-content-ltr" dir="ltr"><pre><span></span><span class="p">{</span>
<span class="w"> </span><span class="nd">"@context"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="nt">"name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"http://xmlns.com/foaf/0.1/name"</span><span class="p">,</span>
<span class="w"> </span><span class="nt">"homepage"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="nd">"@id"</span><span class="p">:</span><span class="w"> </span><span class="s2">"http://xmlns.com/foaf/0.1/workplaceHomepage"</span><span class="p">,</span>
<span class="w"> </span><span class="nd">"@type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"@id"</span>
<span class="w"> </span><span class="p">},</span>
<span class="w"> </span><span class="nt">"Person"</span><span class="p">:</span><span class="w"> </span><span class="s2">"http://xmlns.com/foaf/0.1/Person"</span>
<span class="w"> </span><span class="p">},</span>
<span class="w"> </span><span class="nd">"@id"</span><span class="p">:</span><span class="w"> </span><span class="s2">"http://me.example.com"</span><span class="p">,</span>
<span class="w"> </span><span class="nd">"@type"</span><span class="p">:</span><span class="w"> </span><span class="s2">"Person"</span><span class="p">,</span>
<span class="w"> </span><span class="nt">"name"</span><span class="p">:</span><span class="w"> </span><span class="s2">"John Smith"</span><span class="p">,</span>
<span class="w"> </span><span class="nt">"homepage"</span><span class="p">:</span><span class="w"> </span><span class="s2">"http://www.example.com/"</span>
<span class="p">}</span>
</pre></div>
<p>L'exemple ci-dessus décrit une personne basée sur l'ontologie RDF <a href="FOAF" title="FOAF">FOAF</a>. Premièrement, les deux propriétés JSON <code>name</code> et <code>homepage</code> et le type <code>Person</code> sont mappés aux concepts du vocabulaire FOAF. Dans ce context, la valeur de la propriété <code>homepage</code> est spécifiée comme étant de type <code>@id</code>, c'est-à-dire qu'elle est spécifiée comme <a href="Internationalized_Resource_Identifier" title="Internationalized Resource Identifier">IRI</a> dans la définition du contexte. Basé sur le modèle RDF, cela permet à la personne décrite dans le document d'être identifiée sans ambiguïté par un <a href="Internationalized_Resource_Identifier" title="Internationalized Resource Identifier">IRI</a>. L'utilisation d'IRI résolvables permet aux documents RDF contenant plus d'informations d'être <a href="Transclusion" title="Transclusion">transcludés</a>, ce qui permet aux clients de découvrir de nouvelles données simplement en suivant ces liens.
</p><p>En ayant annoté sémantiquement toutes les données comme dans l'exemple, un <a href="Parseur" class="mw-redirect" title="Parseur">parseur</a> RDF peut identifier que le document contient des informations sur une personne (<code>@type</code>) et si le <a href="Parseur" class="mw-redirect" title="Parseur">parseur</a> comprend le vocabulaire FOAF, il peut déterminer quelles propriétés spécifient le nom de la personne et page d'accueil.
</p>
<div class="mw-heading mw-heading2"><h2 id="Cas_d'utilisation"><span id="Cas_d.27utilisation"></span>Cas d'utilisation</h2></div>
<p>JSON-LD est utilisé par <a href="Google" title="Google">Google</a> pour son <a href="Knowledge_Graph" class="mw-redirect" title="Knowledge Graph">Knowledge Graph</a><sup id="cite_ref-6" class="reference"><a href="#cite_note-6"><span class="cite-bracket">[</span>6<span class="cite-bracket">]</span></a></sup>.
</p>
<div class="mw-heading mw-heading2"><h2 id="Implémentations"><span id="Impl.C3.A9mentations"></span>Implémentations</h2></div>
<p>Des bibliothèques pour JSON-LD existent pour ces langages de programmation: <a href="Javascript" class="mw-redirect" title="Javascript">Javascript</a> (jsonld.js), <a href="Python_(langage)" title="Python (langage)">Python</a> (PyLD, RDFLib-jsonld), <a href="PHP" title="PHP">PHP</a> (php-json-ld, JsonLD), <a href="Ruby" title="Ruby">Ruby</a> (JSON-LD for RDF.rb), <a href="Java_(langage)" title="Java (langage)">Java</a> (JSONLD-JAVA), <a href="C_sharp" class="mw-redirect" title="C sharp">C#</a> (json-ld.net), <a href="Go_(langage)" title="Go (langage)">Go</a> (JSON-goLD).
</p>
<div class="mw-heading mw-heading2"><h2 id="Notes_et_références"><span id="Notes_et_r.C3.A9f.C3.A9rences"></span>Notes et références</h2></div>
<div class="mw-references-wrap"><ol class="references">
<li id="cite_note-1"><span class="mw-cite-backlink"><a href="#cite_ref-1">↑</a> </span><span class="reference-text"><span class="ouvrage" id="2011">«&nbsp;<a rel="nofollow" class="external text" href="http://json-ld.org/spec/latest/json-ld-syntax/"><cite style="font-style:normal;">JSON-LD Syntax 1.0</cite></a>&nbsp;», <time class="nowrap" datetime="2011-12-27" data-sort-value="2011-12-27">27 décembre 2011</time> <small style="line-height:1em;">(consulté le <time class="nowrap" datetime="2011-12-30" data-sort-value="2011-12-30">30 décembre 2011</time>)</small></span></span>
</li>
<li id="cite_note-2"><span class="mw-cite-backlink"><a href="#cite_ref-2">↑</a> </span><span class="reference-text"><span class="ouvrage">«&nbsp;<a rel="nofollow" class="external text" href="http://m.lanthi.com/jsonld4rest-paper"><cite style="font-style:normal;">On Using JSON-LD to Create Evolvable RESTful Services</cite></a>&nbsp;»</span>, M. Lanthaler and C. Gütl in Proceedings of the 3rd International Workshop on RESTful Design (WS-REST 2012) at WWW2012.</span>
</li>
<li id="cite_note-3"><span class="mw-cite-backlink"><a href="#cite_ref-3">↑</a> </span><span class="reference-text"><span class="ouvrage">«&nbsp;<a rel="nofollow" class="external text" href="https://www.w3.org/standards/faq#std"><cite style="font-style:normal;">What does "Web standard" mean? What is a "Recommendation"?</cite></a>&nbsp;»</span></span>
</li>
<li id="cite_note-4"><span class="mw-cite-backlink"><a href="#cite_ref-4">↑</a> </span><span class="reference-text"><span class="ouvrage" id="2014">«&nbsp;<a rel="nofollow" class="external text" href="http://manu.sporny.org/2014/json-ld-origins/"><cite style="font-style:normal;">The Origins of JSON-LD</cite></a>&nbsp;», <time class="nowrap" datetime="2014-01-19" data-sort-value="2014-01-19">19 janvier 2014</time></span></span>
</li>
<li id="cite_note-5"><span class="mw-cite-backlink"><a href="#cite_ref-5">↑</a> </span><span class="reference-text"><span class="ouvrage" id="2014">«&nbsp;<a rel="nofollow" class="external text" href="https://www.w3.org/TR/json-ld/"><cite style="font-style:normal;">A JSON-based Serialization for Linked Data</cite></a>&nbsp;», <time class="nowrap" datetime="2014-01-14" data-sort-value="2014-01-14">14 janvier 2014</time></span></span>
</li>
<li id="cite_note-6"><span class="mw-cite-backlink"><a href="#cite_ref-6">↑</a> </span><span class="reference-text"><span class="ouvrage"><abbr class="abbr indicateur-langue" title="Langue : anglais">(en)</abbr> «&nbsp;<a rel="nofollow" class="external text" href="https://developers.google.com/knowledge-graph/reference/rest/v1/"><cite style="font-style:normal;" lang="en">Method Entities in Search</cite></a>&nbsp;», sur <span class="italique">Google Developers</span> <small style="line-height:1em;">(consulté le <time class="nowrap" datetime="2017-10-17" data-sort-value="2017-10-17">17 octobre 2017</time>)</small></span></span>
</li>
</ol></div>
<div class="mw-heading mw-heading2"><h2 id="Voir_aussi">Voir aussi</h2></div>
<div class="mw-heading mw-heading3"><h3 id="Articles_connexes">Articles connexes</h3></div>
<ul><li><a href="JSON" class="mw-redirect" title="JSON">JSON</a>&nbsp;: un <a href="Format_de_donn%C3%A9es" title="Format de données">format de données</a> textuelles dérivé de la notation des objets du langage <a href="JavaScript" title="JavaScript">JavaScript</a>&nbsp;;</li>
<li><a href="BSON" title="BSON">BSON</a> (<i>Binary JSON</i>)&nbsp;: un format étendant les possibilités du JSON (données temporelles, binaires, etc.), notamment utilisé par <a href="MongoDB" title="MongoDB">MongoDB</a>&nbsp;;</li>
<li><a href="TopoJSON" title="TopoJSON">TopoJSON</a>&nbsp;: un format de stockage des données topologiques&nbsp;;</li>
<li><a href="GeoJSON" title="GeoJSON">GeoJSON</a>&nbsp;: un format de stockage des données géographiques&nbsp;;</li>
<li><a href="YAML" title="YAML">YAML</a>&nbsp;: un autre langage de sérialisation de données.</li></ul>
<div class="mw-heading mw-heading3"><h3 id="Liens_externes">Liens externes</h3></div>
<ul><li><abbr class="abbr indicateur-langue" title="Langue : anglais">(en)</abbr> <a rel="nofollow" class="external text" href="https://json-ld.org/">Site officiel</a></li>
<li><abbr class="abbr indicateur-langue" title="Langue : anglais">(en)</abbr> <a rel="nofollow" class="external text" href="https://github.com/json-ld/json-ld.org">Dépôt GitHub</a></li>
<li><abbr class="abbr indicateur-langue" title="Langue : anglais">(en)</abbr> <a rel="nofollow" class="external text" href="https://json-ld.org/spec/latest/json-ld/">Spécification du JSON for Linking Data W3C Community Group</a></li>
<li><abbr class="abbr indicateur-langue" title="Langue : anglais">(en)</abbr> <a rel="nofollow" class="external text" href="https://www.w3.org/TR/json-ld/">W3C Recommendation</a></li></ul>
<div class="navbox-container" style="clear:both;">


</div>
<ul id="bandeau-portail" class="bandeau-portail"><li><span class="bandeau-portail-element"><span class="bandeau-portail-icone"><span class="noviewer" typeof="mw:File"></span></span> <span class="bandeau-portail-texte">Portail de l’informatique</span> </span></li> <li><span class="bandeau-portail-element"><span class="bandeau-portail-icone"><span class="noviewer" typeof="mw:File"></span></span> <span class="bandeau-portail-texte">Portail de la programmation informatique</span> </span></li> <li><span class="bandeau-portail-element"><span class="bandeau-portail-icone"><span class="noviewer" typeof="mw:File"></span></span> <span class="bandeau-portail-texte">Portail du Web sémantique</span> </span></li> <li><span class="bandeau-portail-element"><span class="bandeau-portail-icone"><span class="noviewer" typeof="mw:File"></span></span> <span class="bandeau-portail-texte">Portail des données</span> </span></li> </ul></div><!--htdig_noindex--><div><div class="zim-footer">
Cet article est issu de <a class="external text" title="Dernière modification le 2025-08-25" href="https://fr.wikipedia.org/wiki/?title=JSON-LD&amp;oldid=228427042">Wikipédia</a>. Sauf mention contraire, le texte est disponible sous <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.fr">Creative Commons Attribution-Share Alike 4.0</a>. Des conditions supplémentaires peuvent s’appliquer aux fichiers multimédias.
</div>
</div><!--/htdig_noindex--></div>
</div>
</main>
</div>
</div>
</div>
<script src="./_webp_/webpHandler.js"></script>

</body></html>